import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

export default defineConfig(({ command }) => ({
  base: "/sub-react/",
  // base: command === "build" ? "/sub-react/" : "/",
  plugins: [react()],
  server: {
    port: 5174,
    cors: true,
    headers: {
      "Access-Control-Allow-Origin": "*",
    },
  },
  preview: { port: 5174 },
}));
